Page({
  onLoad({
    title
  }) {
    this.mock(title)
  },
  // 伪造楼栋数量
  mock(title) {
    const minCeiled = Math.ceil(4)
    const maxFloored = Math.floor(10)
    const size = Math.floor(Math.random() * (maxFloored - minCeiled + 1) + minCeiled)
    //size如果大于7 返回号楼，否则就是栋
    const type = size > 7 ? '号楼' : '栋';
    // 保存给 data
    this.setData({
      title: title,
      size: size,
      type: type
    })
  }
})